﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using WebHzt_Api.Models.Database;
using static WebHzt_Api.Models.GetAdminDateListResponse;

namespace WebHzt_Api.service
{
    public class DateService : IDateService
    {
        public readonly Hzt_WebApiContext _db;
        public DateService(Hzt_WebApiContext db)
        {
            _db = db;
        }
        /// <summary>
        /// 返回后台订单列表
        /// </summary>
        //public List<AdminDate> GetAdminOrderList(string Category, string ConName, string ComIntroduce, DateTime? WinTime, string WinCategory)
        //{
        //    // 登录用户的所有订单
        //    var orders = _db.Data.AsQueryable();
        //    var list = Datum
        //        .Join(_db.Users, x => x.DataId, y => y.UserId, (x, y) => new AdminDate
        //        {
        //            Category = x.Category,
        //            ComIntroduce = x.ComIntroduce,
        //            ConName = x.ConName,
        //            WinCategory = x.WinCategory,
        //            WinTime = x.WinTime
        //        });

        //    return list;
        //}
    }
}

